<template>
  <div>这是我的第一个组件</div>
  <div v-on:click="handleChangeName2">{{ name }}</div>
  <input
    type="text"
    v-on:input="() => console.log(12123)"
    v-on:change="() => console.log(12345)"
  />
  <div>
    v-on的简写：
    <input
      type="text"
      @input="() => console.log(12123)"
      @change="() => console.log(12345)"
    />
  </div>

  <div>{{ name2 }}</div>
</template>
<script>
let name2 = "fsdsdf";
fn4234324();

// 箭头函数
const fn = function () {
  console.log("12312");
};
// fn();
const fn2 = () => {
  console.log("12312");
};

const fn3 = () => 3;
const fn4 = () => {
  return 3;
};
console.log(fn3());

export default {
  data() {
    return {
      name: "小明",
    };
  },
  methods: {
    handleChangeName() {
      console.log("handleChangeName");
    },
    handleChangeName2: function () {
      console.log("handleChangeName2");
    },
  },
};
</script>
<style></style>
